package com.nkym.wypan.model.resp.socket;

import com.nkym.wypan.model.entity.chat.Room;
import lombok.Data;

import java.util.Date;

/**
 * @ClassName PageQueryRoomVO
 * @Author nkym
 * @Date 2023-11-12 10:23
 * @Version 1.0
 */
@Data
public class RoomVO {

    /**
     * 房间ID
     */
    private Long roomId;
    /**
     * 房间名
     */
    private String name;
    /**
     * 房间头像
     */
    private String avatar;
    /**
     * 创建时间
     */
    private Date createTime;

    public static RoomVO covert(Room room) {
        RoomVO vo = new RoomVO();
        vo.setRoomId(room.getRoomId());
        vo.setName(room.getName());
        vo.setAvatar(room.getAvatar());
        vo.setCreateTime(room.getCreateTime());
        return vo;
    }
}
